#include "label.h"
#include<QDebug>
#include<QMouseEvent>

Label::Label(QWidget *parent):QLabel(parent)
{

}

void Label::mousePresssEvent(QMouseEvent *event)
{
    //当前event对象就包含了鼠标点击位置的坐标
    qDebug()<<event->x()<<","<<event->y();
    qDebug()<<event->globalX()<<","<<event->globalY();
}

